import React from "react";
import { RouterType } from "../types";
import Login from "../page/Login";
import Sigin from "../page/Sigin";
import Home from "../page/Home";

import HomeC from "../page/Home/Home";
import List from "../page/Home/List";
import Set from "../page/Home/Set";
const routers: RouterType[] = [
  {
    path: "/",
    element: <Login />,
  },
  {
    path: "/login",
    element: <Login />,
  },
  {
    path: "/sigin",
    element: <Sigin />,
  },
  {
    path: "/home",
    element: <Home />,
    children: [
      {
        path: "/home/home",
        element: <HomeC />,
        rolw: ["admin", "user"],
        meate: {
          title: "首页",
        },
      },
      {
        path: "/home/list",
        element: <List />,
        rolw: ["admin", "user"],
        meate: {
          title: "列表",
        },
      },
      {
        path: "/home/set",
        element: <Set />,
        rolw: ["admin"],
        meate: {
          title: "用户信息",
        },
      },
    ],
  },
];
export default routers;
